import 'package:flutter/material.dart';

import 'package:flutter/cupertino.dart';

class DrawerDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Drawer(
      child: ListView(
        padding: EdgeInsets.zero,
        children: [
          UserAccountsDrawerHeader(
            accountName: Text(
              'hi boy',
              style: TextStyle(fontWeight: FontWeight.bold),
            ),
            accountEmail: Text(
              'zhangzhenya@bonc.com.cn',
            ),
            currentAccountPicture: CircleAvatar(
              backgroundImage: NetworkImage(
                  'https://hbimg.huabanimg.com/01b206adc0faf15781f1332e7f293c2350c4e180cc48-jzJPcV_fw658/format/webp'),
            ),
            decoration: BoxDecoration(
              color: Colors.yellow[400],
              image: DecorationImage(
                image: NetworkImage(
                    'https://hbimg.huabanimg.com/01b206adc0faf15781f1332e7f293c2350c4e180cc48-jzJPcV_fw658/format/webp'),
                fit: BoxFit.cover,
                colorFilter: ColorFilter.mode(
                    Colors.yellow[400].withOpacity(0.6), BlendMode.srcOver),
              ),
            ),
          ),
          // DrawerHeader(
          //   child: Text('header'.toUpperCase()),
          //   decoration: BoxDecoration( color: Colors.grey[100], ),
          // ),
          ListTile(
            title: Text(
              'Message',
              textAlign: TextAlign.right,
            ),
            trailing: Icon(
              Icons.message,
              color: Colors.black,
              size: 22,
            ),
            onTap: () => Navigator.pop(context),
          ),
          ListTile(
            title: Text(
              'Favorite',
              textAlign: TextAlign.right,
            ),
            trailing: Icon(
              Icons.favorite,
              color: Colors.black,
              size: 22,
            ),
            onTap: () => Navigator.pop(context),
          ),
          ListTile(
            title: Text(
              'Settings',
              textAlign: TextAlign.right,
            ),
            trailing: Icon(
              Icons.settings,
              color: Colors.black,
              size: 22,
            ),
            onTap: () => Navigator.pop(context),
          ),
        ],
      ),
    );
  }
}
